<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <script src="../jquery-3.3.1.min.js"></script>
    <style>
        * {
            margin: 0;
            padding: 0;
        }
        
        body {
            position: relative;
        }
        
        .bigone {
            width: 400px;
            height: 600px;
            position: absolute;
            right: 0;
            top: 200px;
            background-color: greenyellow;
        }
        
        .close {
            width: 50px;
            height: 50px;
            right: 0;
            top: 0;
            position: absolute;
            color: red;
            font-size: 30px;
            line-height: 50px;
            text-align: center;
            border: 1px solid black;
        }
        
        .btu {
            width: 400px;
            height: 100px;
            bottom: 0;
            background-color: brown;
            position: absolute;
        }
    </style>
</head>

<body>
    <div class="bigone">
        <div class="close">
            x
        </div>
        <div class="btu"></div>
    </div>
    <script>
        var bheight = document.documentElement.clientHeight || document.body.clientHeight;
        $(".bigone").css("top", bheight - 600);
        $(".close").click(function() {
            $(".bigone").animate({
                width: 0
            }, 1000);
            $(".btu").animate({
                height: 0
            }, 500)
            $(".close").css("display", "none");
        })
    </script>
</body>

</html>